home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
551-575
/
disk_559
/
apig
/
apiglib_v11.lzh
/
e10_superwindow.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1991-09-28
|
2KB
|
91 lines
/* Example of creating SuperBitMap Window */
/* */
x = addlib("apig.library",0,-30,0)
portname = "example10_port"
p = openport(portname)
call set_apig_globals() /* Create Intuitioin Global Constants */
scr = 0
scrtitle = "Hey Buddy, Yea You, This is Your New Screen !"
wintitle = "This is your title"
winidcmp = CLOSEWINDOW
/* *** NOTE *** SUPER_BITMAP FLAG IS SET */
winflags = WINDOWCLOSE+WINDOWDRAG+WINDOWSIZING+WINDOWDEPTH+SUPER_BITMAP+GIMMEZEROZERO
scr = openscreen(0,0,640,400,3,4,5,LACE+HIRES,CUSTOMSCREEN,scrtitle)
sbmap = makebitmap(640,1024,3) /* WE MAKE A VERY LARGE BITMAP */
/* OPEN WINDOW, SUPPLY A POINTER TO THE SUPER BITMAP */
w1 = openwindow(portname,0,0,640,200,2,4,winidcmp,winflags,wintitle,scr,0,sbmap,0)
rpw1 = getwindowrastport(w1)
wlayer = getwindowlayer(w1)
layerinfo = getlayerinfo(wlayer)
image = loadimage("bitmap",0,0,0)
image2 = loadimage("bitmap2",0,0,0)
x = drawimage(rpw1,image,20,20)
x = drawimage(rpw1,image2,60,60)
x = drawimage(rpw1,image,320,320) /* NOTE: this is out of view */
x = drawimage(rpw1,image2,360,360) /* NOTE: this is out of view */
x = pitext(rpw1,70,80,"This bitmap is 640 by 1024",6,3,JAM2,0)
x = pitext(rpw1,70,92,"The two images were also drawn at position 320,320",6,3,JAM2,0)
x = pitext(rpw1,70,104," gonna scroll the layer of this superbitmap",6,3,JAM2,0)
wait 5 sec
/* scroll around the bitmap */
do i = 1 to 220
z = pitext(rpw1,30,40,"This is a test",1,2,JAM2,0,0)
x = scrolllayer(layerinfo,wlayer,0,1)
end
x = pitext(rpw1,70,300," WATCH ME SCROLL LEFT ",3,1,JAM2,0)
wait 2 sec
x = pitext(rpw1,70,312," WATCH NOW ",3,1,JAM2,0)
wait 1 sec
x = scrolllayer(layerinfo,wlayer,40,0)
wait 2 sec
x = pitext(rpw1,70,300," WATCH ME SCROLL RIGHT ",2,1,JAM2,0)
wait 2 sec
x = pitext(rpw1,70,312," WATCH NOW ",2,1,JAM2,0)
wait 1 sec
x = scrolllayer(layerinfo,wlayer,-40,0)
exitme = 0
wait 2 sec
x = pitext(rpw1,70,350," Im Done ",5,1,JAM2,0)
do forever
x = waitpkt(portname)
do forever
msg = getpkt(portname)
if msg = '0000 0000'x then leave
class = getarg(msg,0)
if class = CLOSEWINDOW then exitme = 1
x = reply(msg,0)
end
if exitme = 1 then leave
end
x = freebitmap(sbmap)
x = freeimage(image)
x = freeimage(image2)
a =closewindow(w1)
a =closescreen(scr)
exit